home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / examples / doc / animhaus next >
Text File  |  1997-07-08  |  739b  |  27 lines

  1. ; This batch file creates rotates a three-dimensional "house".
  2. ; The example is from Chapter 11, "Plotting Multi-dimensional
  3. ; Arrays", of _Using IDL_.
  4.  
  5. ; Reset any 3-D transformations that may be in use.
  6.  
  7. WINDOW, /FREE, XSIZE=300, YSIZE=300, COLORS=-16
  8.  
  9. ; Initialize animation: set frame size and number of frames.
  10. sizx = 300
  11. sizy = 300
  12. nframes = 16
  13. XINTERANIMATE, SET=[sizx, sizy, nframes]
  14.  
  15. ; Loop to create nframes images, rotating in the Z plane each time.
  16. FOR i = 0, nframes - 1 DO BEGIN $
  17.     SCALE3, AX = 75, AZ = i * 360. / nframes & $
  18.     ERASE & $
  19.     HOUSE & $    ;Draw the house.
  20.     SCALE3, AX = 75, AZ = i * 360. / nframes & $
  21.     XINTERANIMATE, FRAME=i, WINDOW=!D.WINDOW & $
  22. ENDFOR 
  23.  
  24. WDELETE
  25. ; Run the animation.
  26. XINTERANIMATE
  27.